package com.lening.collect.controller;

import com.lening.collect.service.IStatisticsService;
import com.lening.common.web.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ToDo:
 * @Author：杨军
 * @date: 2024/06/06 08:08
 */
@RestController
@RequestMapping("statistics")
public class StatisticsController {
    @Autowired(required = false)
    private IStatisticsService service;
    @GetMapping("get")
    public Result<Map<String, Object>> get(){
        return Result.ok(service.get());
    }
    @GetMapping("getAll")
    public Result<Map<String, Object>> getAll(){
        return Result.ok(service.getAll());
    }
}